<template>
  <div>
    <Crud :path="code" />
  </div>
</template>
<script lang="ts" setup>
import { useRoute } from "vue-router";
import Crud from "@/components/Crud/index.vue";
import { ref } from "vue";

const routes = useRoute();
const match = routes.path.match(/\/([^/]+)\/?$/);
const code = ref("code");
code.value = match ? match[1] : null;
</script>
